package com.lagou;

import com.lagou.controller.ComsumerComponet;
import org.apache.dubbo.config.spring.context.annotation.EnableDubbo;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import java.io.IOException;

@SpringBootApplication
public class ComsumerAMain {
    public static void main(String[] args) throws IOException {
        SpringApplication.run(ComsumerAMain.class,args);
//        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ComsumerConfiguration.class);
//        context.start();
//        while(true){
//            System.in.read();
//            System.out.println(context.getBean(ComsumerComponet.class).sayHello("world"));
//        }
    }
    @Configuration
    @EnableDubbo
    @PropertySource("classpath:/dubbo-comsumer.properties")
    @ComponentScan("com.lagou.controller")
    static class ComsumerConfiguration{

    }
}
